
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<p ng-if="!nodeid" class="p-info"><em>Select operator in the job graph above to see the metrics</em></p>
<nav ng-if="nodeid" class="navbar navbar-default navbar-secondary-additional navbar-secondary-additional-2">
  <div class="navbar-info">{{ vertex.name }}</div>
  <div class="navbar-info">{{ nodeid }}</div>
  <div ng-if="availableMetrics.length" class="dropdown add-metrics">
    <button type="button" data-toggle="dropdown" class="btn btn-default navbar-btn dropdown-toggle">
      Add metric
      &nbsp;<span class="caret"></span>
    </button>
    <ul class="dropdown-menu dropdown-menu-right metric-menu">
      <section class="search">
        <label for="search-input"><i aria-hidden="true" class="fa fa-search"><span class="sr-only">Search icons</span></i></label>
        <input type="text" ng-model="metricsFilterQuery" placeholder="Search available metrics..." class="metrics-filter"/>
      </section>
      <li ng-repeat="metric in availableMetrics | searchMetrics:metricsFilterQuery track by $index"><a ng-click="addMetric(metric)">{{ metric.id | limit }}</a></li>
    </ul>
  </div>
  <div ng-if="!availableMetrics.length" class="dropdown add-metrics">
    <button type="button" data-toggle="dropdown" disabled="disabled" class="btn btn-default navbar-btn dropdown-toggle"><i>No metrics available</i></button>
  </div>
</nav>
<div ng-if="nodeid &amp;&amp; metrics.length == 0" class="row metric-row">
  <p class="p-info"><em>No metrics selected</em></p>
</div>
<ul ng-if="nodeid &amp;&amp; metrics.length &gt; 0" dnd-list="metrics" dnd-drop="dropped(event, index, item, external, type, external)" class="metric-row">
  <li ng-repeat="metric in metrics track by metric.id" dnd-draggable="metric" dnd-dragstart="dragStart()" dnd-dragend="dragEnd()" dnd-canceled="dragEnd()" ng-class="{big: metric.size != 'small'}" class="metric-col">
    <metrics-graph metric="metric" window="window" get-values="getValues(metric.id)" remove-metric="removeMetric(metric)" set-metric-size="setMetricSize" set-metric-view="setMetricView"></metrics-graph>
  </li>
</ul>
<div class="clearfix"></div>